import request from '@/utils/request'
import qs from 'qs'
export default{
  //查询
  pageDiseCategoryQuery(param){
     return request({
     url:'/diseCategory/pageDiseCategoryQuery',
     method:'get',
     params:{
      page:param.page,
      limit:param.limit,
      dicaName:param.DicaName,
      dicaType:param.DicaType
     }
  })
},
  getAllDiseCategory(){
  return request({
     url:'/diseCategory/getAllDiseCategory',
     method:'get',
     params:{
      dicaName:"",
      dicaType:0,
     }
  })
},
//病例分类添加
  addDiseCategory(param){
    return request({
      url:'/diseCategory/addDiseCategory',
      method:'post',
      data:{
          	id:0,
          	dicaCode:param.dicaCode,
          	dicaName:param.dicaName,
          	sequenceNo:param.sequenceNo,
          	dicaType:param.dicaType,
          	delMark:1,
      }
    })
  },
//疾病查询
getdiseaseInfo(param){
     return request({
     url:'/disease/getdiseaseInfo',
     method:'get',
     params:{
      page:param.page,
      limit:param.limit,
      diseCategoryID:param.diseCategoryID,
     }
  })
},
//修改
  updatedisease(param){
    return request({
      url:'/disease/updateDisease',
      method:'post',
      data:{
          id:param.id,
          diseaseCode:param.diseaseCode,
          diseaseName:param.diseaseName,
          diseaseICD:param.diseaseICD,
          diseCategoryID:param.diseCategoryID,
          delMark:param.delMark,
      }
    })
  },
  //添加
  adddisease(param){
    return request({
      url:'/disease/addDisease',
      method:'post',
      data:{
        id:0,
        diseaseCode:param.diseaseCode,
        diseaseName:param.diseaseName,
        diseaseICD:param.diseaseICD,
        diseCategoryID:param.diseCategoryID,
        delMark:1,
      }
    })
  },
  //删除
  deletedisease(ids){
    return request({
      url:'/disease/delDiseaseByIds',
      method:'post',
      data:ids
    })
  },
  //修改
  updateDiseCategory(param){
    return request({
      url:'/diseCategory/updateDiseCategory',
      method:'post',
      data:{
        id:param.id,
        dicaCode:param.dicaCode,
        dicaName:param.dicaName,
        sequenceNo:param.sequenceNo,
        dicaType:param.dicaType,
        delMark:1,
      }
    })
  },
  //删除
  delereDiseCategory(id){
    return request({
      url:'/diseCategory/delereDiseCategory',
      method:'post',
      headers:{
        'Context-Type':'application/x-www-form-urlencoded'
      },
      data:qs.stringify({id:id})
    })
  }
}
